-
-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add simple function to count irreducible polynomials over 𝔽q #36390
add simple function to count irreducible polynomials over 𝔽q #36390
Conversation
maybe rather put in src/sage/combinat/q_analogues.py ? |
Pardon my ignorance: Why? |
because similar polynomials in q (cardinal of finite field) are already there.. and your method should take q as a parameter, and work with q an indeterminate |
I have a few of comments:
instead of the current:
|
6795dc9
to
44235ea
Compare
Thanks for the suggestions: All done, except for the multivariate case, which is left for future work. |
44235ea
to
b31a4c5
Compare
Depending on how important the multivariate case is, this could be modified to include One thing I didn't understand was whether the formula in Bodin's work (which is only asymptotic) was exactly the same as Max's comment in the forum, or whether Max's comment and PARI implementation were precise? Personally I think this univariate one is nice as it is, especially with the polynomial output when |
@GiacomoPope: Bodin's result is not only asymptotic, Lemma 4 in his work gives an exact formula. That formula looks similar to mine (which was posted in the dxdy.ru forum). Historically, my formula appeared first (in 2006), but I considered it minor and did not bother to publish it elsewhere. PARI/GP code implements my formula and it was used to produce terms for many related sequences in the OEIS, some of which (such as A115457) I added back in 2006. I hope this explains the context. Btw, A115457 links another relevant paper Survey on counting special types of polynomials. |
Thanks for the context Max. This helps. Potentially this function would be useful for people, but I don't think it needs to be included into this PR for this contribution to have value. It can be added at a later date without adding any additional work. If you disagree though, then maybe porting your PARI code for this PR is something that needs to be done. |
I'm not familiar enough with Sage development, and thus I'd appreciate it if someone can properly incorporate my code into this PR. Please find my extension to arbitrary positive
|
b31a4c5
to
92685a1
Compare
Thanks for writing this code @maxale; I've added it to the branch together with the corresponding documentation changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, which can probably be taken or left.
@yyyyx4 I did something stupid in my suggestion while copy pasting and introduced whitespace issues! |
8bb63d7
to
0b345e1
Compare
Co-authored-by: Giacomo Pope <44242839+GiacomoPope@users.noreply.github.com>
0b345e1
to
d952887
Compare
Documentation preview for this PR (built with commit d952887; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, appears to have addressed reviewer comments, passes tests.
There is a well-known formula for counting irreducible polynomials of given degree$n$ over a finite field $\mathbb F_q$ , using Möbius inversion. In this patch we add a simple function to evaluate this formula.